package cn.yitun.chat.yitunservercommonmessage.client;

import cn.yitun.chat.yituncommonmessage.AbstractMessage;
import cn.yitun.chat.yituncommonmessage.Head;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.HashMap;
import java.util.Map;

/**
 * @author: yitun
 * @date: 2016年8月22日 下午5:03:51
 */
@Data
@NoArgsConstructor
public class Message extends AbstractMessage<Object> {

	private static final long serialVersionUID = 1L;
	
	private Head head;
	private Map<String, Object> body = new HashMap<>();

	public static final String code_fail = "0";
	public static final String code_success = "1";


	public Object put(String key, Object value) {
		return body.put(key, value);
	}

	public Object get(String key) {
		return body.get(key);
	}
}
